package com.dabay.web.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.dabay.web.dao.NewsDAO;
import com.dabay.web.module.News;
import com.dabay.web.module.NewsDetail;
import com.dabay.web.service.News_service;

@Service
public class News_serviceImpl  implements News_service{

	
	 @Autowired
	 @Qualifier("newsDAO")
	 private NewsDAO newsDAO;
	 
	 
	public int insertNews(News news) {
		// TODO Auto-generated method stub
		return newsDAO.insertNews(news);
	}


	public int selectNewsById(String docid) {
		// TODO Auto-generated method stub
		return newsDAO.selectNewsById(docid);
	}


	public int insertNewsDetail(NewsDetail newsDeatil) {
		// TODO Auto-generated method stub
		return newsDAO.insertNewsDetail(newsDeatil);
	}


	public int selectNewsDetail(String docid) {
		// TODO Auto-generated method stub
		return newsDAO.selectNewsDetail(docid);
	}


	public List<News> selectNewsBy() {
		// TODO Auto-generated method stub
		return newsDAO.selectNewsBy();
	}


	public List<News> selectNewsByChannelid(String channelid) {
		// TODO Auto-generated method stub
		return newsDAO.selectNewsByChannelid(channelid);
	}


	public NewsDetail selectNewsDetailByDocid(String docId) {
		// TODO Auto-generated method stub
		return newsDAO.selectNewsDetailByDocid(docId);
	}


	public List<News> selectNewsLimit(String channelid) {
		// TODO Auto-generated method stub
		return newsDAO.selectNewsLimit(channelid);
	}

	public List<News> selectNewsByChannelid_FY(Map paramMap){
		return newsDAO.selectNewsByChannelidFY(paramMap);
	}
	
	public List<News> selectIndex_zwdt() {
		// TODO Auto-generated method stub
		return newsDAO.selectIndex_zwdt();
	}
	public void deleteNews_zwdt() {
		newsDAO.deleteNews_zwdt();
	}
	public void deleteNews(Map paramMap ) {
		newsDAO.deleteNews(paramMap);
		newsDAO.deleteNewsDetail(paramMap);
	}
	
	public int insertNews_zwdt(News news) {
		// TODO Auto-generated method stub
		return newsDAO.insertNews_zwdt(news);
	}

	public List<News> selectNewsLimit_zwdt() {
		// TODO Auto-generated method stub
		return newsDAO.selectNewsLimit_zwdt();
	}
	public List<News> selectNewsImageList() {
		// TODO Auto-generated method stub
		return newsDAO.selectNewsImageList();
	}
	

}
